set(HEADERS
        include/moveit/rviz_plugin_scene_editor/scene_editor_display_helper.h
        include/moveit/rviz_plugin_scene_editor/scene_editor_frame.h
        include/moveit/rviz_plugin_scene_editor/scene_editor_display.h
        )
qt_wrap_ui(UIC_FILES
        # src/ui/motion_planning_rviz_plugin_frame.ui
        src/ui/rviz_plugin_scene_editor_frame.ui
        )
qt5_add_resources(QRC_FILES
        src/icons/scene_editor_icons.qrc
        )

include_directories(${CMAKE_CURRENT_BINARY_DIR})

# Plugin Source
set(SOURCE_FILES
        src/scene_editor_display_helper.cpp
        src/scene_editor_frame.cpp
        src/scene_editor_display.cpp
        ${QRC_FILES}
        # src/icons/scene_editor_icons.qrc
        )

set(MOVEIT_LIB_NAME moveit_rviz_plugin_scene_editor)
add_library(${MOVEIT_LIB_NAME}_core ${SOURCE_FILES} ${HEADERS} ${UIC_FILES})
set_target_properties(${MOVEIT_LIB_NAME}_core PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
target_link_libraries(${MOVEIT_LIB_NAME}_core moveit_rviz_plugin_render_tools_mirror
        ${catkin_LIBRARIES} ${rviz_DEFAULT_PLUGIN_LIBRARIES} ${QT_LIBRARIES} ${Boost_LIBRARIES})

add_library(${MOVEIT_LIB_NAME} src/plugin_init.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
target_link_libraries(${MOVEIT_LIB_NAME} ${MOVEIT_LIB_NAME}_core ${catkin_LIBRARIES} ${Boost_LIBRARIES})

install(DIRECTORY include/ DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})

install(TARGETS ${MOVEIT_LIB_NAME} ${MOVEIT_LIB_NAME}_core
        ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
        RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
